var dbserver = require('../dao/dbserver')

// 获取好友列表
exports.getFriend = function(req,res){
    let {uid,state} = req.body;

    // res.send(req.body)
    dbserver.getUsers(uid,state,res);
}


// 获取最后一条消息
exports.getLastMsg = function(req,res){
    dbserver.getOneMsg(req.body,res);
}


// 汇总一对一未读消息数
exports.unreadMsg = function(req,res){
    dbserver.unreadMsg(req.body,res);
}

// 好友消息标记已读
exports.updateMsg = function(req,res){
    dbserver.updateMsg(req.body,res);
}


